<!DOCTYPE html>

<html>
    <head>
        <meta charset="utf-8">
        <title>菜鸟教程(runoob.com)</title>
    </head>
    <body>
        <p>创建JavaScript对象。</p>
        <p id="demo"></p>
        <p id="demo1"></p><br/>
        <button onclick="myFunction('Bob', 'Builder')">点击这里</button>
        <div style="margin-top: 50px;">
            <button onclick="getElementById('demo1').innerHTML=Date()">
                现在的时间是？
            </button>
        </div>
        <script>
            var person = {firstName:"John",
                lastName:"Doe",
                age:50,
                eyeColor:"blue"
            }
            document.getElementById("demo").innerHTML = 
                person.firstName + "现在" + person.age + "岁."
            
            function myFunction(name, job)
            {
                alert("Welcome" + name + ", the" + job)
            }
        </script>
    </body>
</html>